<datasource-http-settings current="ctrl.current" suggest-url="http://localhost:9200">
</datasource-http-settings>

<h3 class="page-heading">Elasticsearch details</h3>

<div class="gf-form-group">
	<div class="gf-form-inline">
		<div class="gf-form max-width-25">
			<span class="gf-form-label width-9">索引名称</span>
			<input class="gf-form-input" type="text" ng-model='ctrl.current.database' placeholder="" required></input>
		</div>

		<div class="gf-form width-14">
      <span class="gf-form-label width-9">模式</span>
      <span class="gf-form-select-wrapper">
          <select class="gf-form-input gf-size-auto" ng-model="ctrl.current.jsonData.interval" ng-options="f.value as f.name for f in ctrl.indexPatternTypes" ng-change="ctrl.indexPatternTypeChanged()" ></select>
      </span>
		</div>
	</div>

	<div class="gf-form max-width-25">
		<span class="gf-form-label width-9">时间字段名称</span>
		<input class="gf-form-input" type="text"  ng-model='ctrl.current.jsonData.timeField' placeholder="" required ng-init=""></input>
	</div>

	<div class="gf-form">
    <span class="gf-form-label width-9">版本</span>
    <span class="gf-form-select-wrapper">
        <select class="gf-form-input gf-size-auto" ng-model="ctrl.current.jsonData.esVersion" ng-options="f.value as f.name for f in ctrl.esVersions"></select>
    </span>
	</div>
    <div class="gf-form max-width-30" ng-if="ctrl.current.jsonData.esVersion>=56">
        <span class="gf-form-label width-15">最大并发分片请求数</span>
        <input class="gf-form-input" type="text"  ng-model='ctrl.current.jsonData.maxConcurrentShardRequests' placeholder="" required></input>
    </div>
	<div class="gf-form-inline">
		<div class="gf-form">
			<span class="gf-form-label width-9">最短时间间隔</span>
			<input type="text" class="gf-form-input width-6" ng-model="ctrl.current.jsonData.timeInterval" spellcheck='false' placeholder="10s"></input>
			<info-popover mode="right-absolute">
        按时间间隔自动分组的下限。建议设置为写入频率，例如，如果数据每分钟写入一次，就可以设为 <code>1m</code>。
			</info-popover>
		</div>
	</div>
</div>
